package easy;

public class Solution_1827 {

    public int minOperations(int[] nums) {
        int count = 0;
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] <= nums[i - 1]) {
                int temp = nums[i - 1] - nums[i] + 1;
                nums[i] += temp;
                count += temp;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Solution_1827 model = new Solution_1827();
//        System.out.println(Integer.parseInt("002010"));
    }
}
